package com.music.service.impl;

import com.music.dao.UserFocusMapper;
import com.music.entity.UserFocus;
import com.music.service.UserFocusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional
@Service
public class UserFocusServiceImpl implements UserFocusService {
    @Autowired
    private UserFocusMapper userFocusMapper;
    @Override
    public int panDuanFocus(String u1, String u2) {
        return userFocusMapper.panDuanFocus(u1, u2);
    }

    @Override
    public int insert(String u1, String u2) {
        UserFocus userFocus=new UserFocus();
        userFocus.setUserFocusObjId(u2);
        userFocus.setUserId(u1);
        userFocus.setUserFocusType(1);
        return userFocusMapper.insert(userFocus);
    }

    @Override
    public int delete(String u1, String u2) {
        return userFocusMapper.delete(u1, u2);
    }
}
